package com.jake.springboot.calculation.context;

import com.google.common.collect.Maps;
import com.jake.springboot.calculation.strategy.CalculationStrategy;
import lombok.Getter;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
@Getter
public class CalculationContext {

    private final Map<String, CalculationStrategy> calculationStrategyMap = Maps.newHashMapWithExpectedSize(4);

    public CalculationContext(Map<String, CalculationStrategy> calculationStrategyMap) {
        this.calculationStrategyMap.clear();
        this.calculationStrategyMap.putAll(calculationStrategyMap);
    }

}
